package com.hisense.ovcloud.warehouse.amq;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.core.JmsTemplate;

@Configuration
public class AMQProducer {
    private final JmsTemplate jmsTemplate;

    public AMQProducer(@Qualifier("blackListJmsTemplate") JmsTemplate jmsTemplate) {
        this.jmsTemplate = jmsTemplate;
    }

    public boolean sendBlackListMsg(final String message) {
        jmsTemplate.convertAndSend(message);
        return true;
    }
}
